package com.ziyia.a2_10_all;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.SubMenu;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);



    }

    public void actionIntent(Context context, Class target) {
        Intent intent = new Intent(context, target);
        startActivity(intent);
    }

    public void menu1(View view) {
        actionIntent(this, Menu1.class);
    }


    public void menu2(View view) {
        actionIntent(this, Menu2.class);
    }

    public void menu3(View view) {
        actionIntent(this, Menu3.class);
    }

    public void myPopupmenu(View view) {
        actionIntent(this, MyPopupMenu.class);
    }
}